import React, {useEffect, useState} from 'react';
import './index.css';
import http from "../../../util/http";

function Honor(props) {
    const [ry, setRy] = useState([]);
    useEffect(() => {
        http.doGet('/model/data/get',{type: "honor"}).then(res => {
            if (res.status === 200) {
                setRy(res.data);
            }
        });
    }, []);

    return (
        <div className="portal-function-main">
            {
                ry && ry.map((item, index) => {
                    return (
                        <div className="portal-function-item" key={index}>
                            <div className="portal-function-item-img">
                                <img src={item.img} style={{width: "100%",height: "100%"}} alt=""/>
                            </div>
                            <div className="portal-function-item-text">
                                <span>{item.name}</span>
                            </div>
                        </div>
                    )
                })
            }
        </div>
    );
}

export default Honor;